package com.cy.pj.goods.activity.service;

import com.cy.pj.goods.activity.dao.GoodsDao;
import com.cy.pj.goods.activity.pojo.Goods;

import org.slf4j.LoggerFactory;
import org.slf4j.Logger;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class GoodsServiceImpl implements GoodsService {
    private static final Logger log = LoggerFactory.getLogger(GoodsServiceImpl.class);

    @Autowired
    private GoodsDao goodsDao;

    @Override
    public List<Goods> findGoods() {
       long t1= System.currentTimeMillis();
       List<Goods> list = goodsDao.findGoods();
       long t2= System.currentTimeMillis();
       log.info("t2-t1={}",t2-t1);
       return list;

    }
}

